<script setup lang="ts">
import { ref } from 'vue'
import Channel from './components/Channel.vue'
import NewsList from './components/NewsList.vue'

// !初始高亮 id，我希望是数组里面第 0 项的 id
const channelId = ref(888)

const updateChannelId = (newChannelId: number) => {
  channelId.value = newChannelId
}
</script>

<template>
  <Channel :channel-id="channelId" @updateChannelId="updateChannelId"/>
  <NewsList />
</template>